package com.framework.dailyviewactivity;

import android.util.Log;

import androidx.databinding.BindingAdapter;

import com.framework.dailyviewactivity.weekview.DiaryItemEntity;
import com.framework.dailyviewactivity.weekview.MonthLoader;
import com.framework.dailyviewactivity.weekview.WeekView;

import java.util.List;

public class AppRecyclerBinding {
    @BindingAdapter(value = {"dataList"})
    public static void bindDataList(WeekView weekView, final List<? extends DiaryItemEntity> dataList) {
        weekView.setMonthChangeListener(new MonthLoader.MonthChangeListener() {
            @Override
            public List<? extends DiaryItemEntity> onMonthChange(int newYear, int newMonth) {
                return dataList;
            }
        });
    }

}
